//
//  TPTabbarController.m
//  TPHelper
//
//  Created by xuqiang on 2020/7/23.
//  Copyright © 2020 xuqiang. All rights reserved.
//

#import "TPTabbarController.h"
#import "UIColor+Additions.h"

@interface TPTabbarController ()

@end

@implementation TPTabbarController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self configTabBarStyle];
    UINavigationController *navi = self.viewControllers[0];
    [navi.tabBarItem setImage:[[UIImage imageNamed:@"tab_icon_screen_normal"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
    [navi.tabBarItem setSelectedImage:[[UIImage imageNamed:@"tab_icon_screen_selected"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
    navi.tabBarItem.title = @"本地";
    UINavigationController *navi1 = self.viewControllers[1];
    [navi1.tabBarItem setImage:[[UIImage imageNamed:@"tab_icon_web_normal"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
    [navi1.tabBarItem setSelectedImage:[[UIImage imageNamed:@"tab_icon_web_selected"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
    navi1.tabBarItem.title = @"小视频";

}

- (void)configTabBarStyle{
    [[UITabBar appearance] setBackgroundColor:[UIColor dj_colorWithHex:@"#ffffff"]];
    [[UITabBarItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor dj_colorWithHex:@"666666"],NSFontAttributeName:[UIFont systemFontOfSize:10]} forState:UIControlStateNormal];
    [[UITabBarItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor dj_colorWithHex:@"0082e0"],NSFontAttributeName:[UIFont systemFontOfSize:10]} forState:UIControlStateSelected];
}


/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
